package com.zlj.response;

import java.io.IOException;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;

@WebServlet(urlPatterns = "/ServletDemo",loadOnStartup=1)
public class ServletDemo implements Servlet {
	
	public ServletDemo() {
		System.out.println("这是ServletDemo创建了！");
	}
	@Override
	public void destroy() {
		System.out.println("这是ServletDemo的销毁方法！");
		
	}

	@Override
	public ServletConfig getServletConfig() {
		
		return null;
	}

	@Override
	public String getServletInfo() {
		System.out.println("这是ServletDemo的getServletInfo方法");
		return null;
	}

	@Override
	public void init(ServletConfig config) throws ServletException {
		System.out.println("这是ServletDemo的init()方法！");
		
	}

	@Override
	public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
		System.out.println("这是ServletDemo的service方法！");
	}
}
